package com.intramirror.product.service;

import com.intramirror.product.entity.ImPriceDiscountMapping;
import com.intramirror.product.entity.PriceChangeRule;
import com.intramirror.product.vo.BasePriceRuleChangeVO;
import java.util.List;
import java.util.Map;

public interface IPriceRuleService {
    Map<Long, List<ImPriceDiscountMapping>> getImBrandRuleMapping(Long imPriceAlgorithmId);

    Map<Long, Map<Integer, Integer>> convertDiscountMapping(Map<Long, List<ImPriceDiscountMapping>> mapBrandMapping);

    void refreshSnapshotPrice(Long imPriceAlgorithmId) throws Exception;

    void refreshSnapshotPrice(Long imPriceAlgorithmId, Long ruleId) throws Exception;

    Map<Long, List<ImPriceDiscountMapping>> getHotImBrandRuleMapping();

    void changePriceRule(BasePriceRuleChangeVO basePriceRuleChangeVO);

    Integer getImDiscount(Long brandId, Long boutiqueDiscountOff, Map<Long, Map<Integer, Integer>> mapBrandMapping);

    void updateProductPreviewPriceByBoutique(Long ruleId, Integer previewStatus, int flag);

    PriceChangeRule selectByPrimaryKey(Long priceChangeRuleId);

    boolean synUpdateProductPrice(Long vendor_id, int categoryType, Long price_change_rule_id) throws Exception;
    boolean synUpdateProductPriceByValidFrom(String startTime, String endTime) throws Exception;

    List<Map<String, Object>> selectNowActiveRule(Map<String, Object> params);

    boolean synUpdateProductPriceByPriceChangeRuleIds(List<Long> priceChangeRuleIds) throws Exception;
}
